﻿
namespace Takkou.Core
{
    /** Current element types in the game */
    public enum ElmType
    {
        ROBOT,
        KEY,
    }

    /** Generic superclass of all elements in the world, including the player-controlled robot. */
    public class WorldElement
    {
        public string ID { get; protected set; }      // element identifier. Each world element must have an unique identifier.
        public ElmType Type { get; protected set; }   // element type (for easy identification)
        public Sprite View { get; set; }              // UserControl used to visually represent the element in the world.

        /** Instantiate a new element */
        public WorldElement(string name, ElmType t)
        {
            ID = name;
            Type = t;
        }

        /**
         * Called on each game iteration for updating the element state.
         * Should be overwrite in subclasses.
         */
        public virtual void update() { }
    }
}
